//
//  specialChannelModel.swift
//  甜言蜜语
//
//  Created by yingli_yanfa_liuxingyu on 16/7/27.
//  Copyright © 2016年 wl. All rights reserved.
//


import Foundation
import SwiftyJSON
//明星企业信息
class starBusinessInfo: NewsModelInitProtocol {
    var timg: String
    var id: String
    var unitname: String
    var unitarea: String
    var unittype: String
    var unitaddress: String
    var introduction: String
    var reputation: String
    required init(json: JSON) {
        
        timg = json["timg"].stringValue
        id = json["id"].stringValue
        unitname = json["unitname"].stringValue
        unitarea = json["unitarea"].stringValue
        unittype = json["unittype"].stringValue
        unitaddress = json["unitaddress"].stringValue
        introduction = json["introduction"].stringValue
        reputation = json["reputation"].stringValue
        
    }

}
//专业产品列表
class specialProductInfo: NewsModelInitProtocol {
    var id: String
    var name: String
    var imgsrc: String
    var imgType: Int
    var imgextra: [String]?
    var logo: String
    var reputation: String?
    required init(json: JSON) {
      id = json["id"].stringValue
      name = json["name"].stringValue
      imgsrc = json["imgsrc"].stringValue
      imgType = json["imgType"].intValue
      imgextra = ModelArrayProvider.arrayWithJson(json["imgextra"]) 
      logo = json["logo"].stringValue
      reputation = json["reputation"].stringValue
    }
}

//明星企业详情列表

class specialStarDetailInfo: NewsModelInitProtocol {
    var id: String
    var phone: String
    var introduction: String
    var recruitments: [mySelfRecruitmentInfo]?//招聘列表
    var unitmain: String//主营
    var unittype: String
    var infomations: [NewsModel]?//企业相关新闻
    var unitaddress: String
    var isshoucang: Bool
    var unitstyles: [specialStarDetailArrInfo]?//企业风貌
    var unitscale: String
    var unitname: String
    var timg: String
    var brands: [specialStarDetailBrandArrInfo]?//品牌列表
    var reputation: String
    required init(json: JSON) {
        id = json["id"].stringValue
        phone = json["phone"].stringValue
        introduction = json["introduction"].stringValue
        recruitments = ModelArrayProvider.arrayModel(mySelfRecruitmentInfo.self, json: json["recruitments"])
        unitmain = json["unitmain"].stringValue
        unittype = json["unittype"].stringValue
        infomations = ModelArrayProvider.arrayModel(NewsModel.self, json: json["infomations"])
        unitaddress = json["unitaddress"].stringValue
        isshoucang = json["isshoucang"].boolValue
        unitstyles = ModelArrayProvider.arrayModel(specialStarDetailArrInfo.self, json: json["unitstyles"])
        unitscale = json["unitscale"].stringValue
        unitname = json["unitname"].stringValue
        timg = json["timg"].stringValue
        reputation = json["reputation"].stringValue
        brands = ModelArrayProvider.arrayModel(specialStarDetailBrandArrInfo.self, json: json["brands"])
        
        }
    
}

class specialStarDetailArrInfo: NewsModelInitProtocol {
    var id: String
    var imgsrc: String
    required init(json: JSON) {
        id = json["id"].stringValue
        imgsrc = json["imgsrc"].stringValue
            }
}
//brandArr
class specialStarDetailBrandArrInfo: NewsModelInitProtocol {
    var id: String
    var imgsrc: String
    var isshoucang: Bool
    var logo: String
    

    required init(json: JSON) {
        id = json["id"].stringValue
        imgsrc = json["imgsrc"].stringValue
        isshoucang = json["isshoucang"].boolValue
        logo = json["logo"].stringValue
    }
}
//专业产品详情
class specialDetailInfo: NewsModelInitProtocol {
    var id: String
    var name: String
    var imgsrc: String
    var csscale: String
    var csnature: String
    var cstype: String
    var csaddress: String
    var csphone: String
    var dlscale: String
    var dlnature: String
    var dltype: String
    var dladdress: String
    var dlphone: String
    var body: String
    var showtype: String
    var infomations: [NewsModel]?
    var logo: String
    var brandimgs: [NewsDetailImgModel]?
    var title: String
    var ptime: String
    var isshoucang: Bool
    required init(json: JSON) {
        id = json["id"].stringValue
        name = json["name"].stringValue
        imgsrc = json["imgsrc"].stringValue
        csscale = json["csscale"].stringValue
        csnature = json["csnature"].stringValue
        cstype = json["cstype"].stringValue
        csaddress = json["csaddress"].stringValue
        csphone = json["csphone"].stringValue
        dlscale = json["dlscale"].stringValue
        dlnature = json["dlnature"].stringValue
        dltype = json["dltype"].stringValue
        dladdress = json["dladdress"].stringValue
        dlphone = json["dlphone"].stringValue
        body = json["body"].stringValue
        showtype = json["showtype"].stringValue
        infomations = ModelArrayProvider.arrayModel(NewsModel.self, json: json["infomations"])
        logo = json["logo"].stringValue
        brandimgs = ModelArrayProvider.arrayModel(NewsDetailImgModel.self, json: json["brandimgs"])
        title = json["title"].stringValue
        ptime = json["ptime"].stringValue
        isshoucang = json["isshoucang"].boolValue
        
    }
}